import request from '@/utils/request';

/* 
服务器和网络列表   
type： string 
必需
类型 1：网络 2：服务器
*/
export const inspectServerNetworkList = (query) => {
  return request({ url: '/inspect/serverNetwork/list', method: 'get', params: query });
};
/* 新增 模型列表 */
export const inspectmodelList = (query) => {
  return request({ url: '/inspect/model/modelList', method: 'get', params: query });
};
/* 新增 */
export const inspectmodelAdd = (query) => {
  return request({ url: '/inspect/serverNetwork', method: 'post', data: query });
};
/* 修改 */
export const inspectmodelEdit = (query) => {
  return request({ url: '/inspect/serverNetwork', method: 'put', data: query });
};

/* 删除 */
export const inspectmodelDel = (query) => {
  return request({ url: '/inspect/serverNetwork/delete', method: 'delete', params: query });
};
/* 服务器网络 详情 */

export const inspectDetailList = (query) => {
  return request({ url: '/inspect/serverNetwork/'+query, method: 'get' });
};
 



/* 基础环境巡检  列表查询  基础环境巡检列表  *******************************************************************/
export const infrastructureList = (query) => {
  return request({ url: '/inspect/base/page', method: 'get', params: query });
};

/* 新增 */
export const infrastructureAdd = (query) => {
  return request({ url: '/inspect/base', method: 'post', data: query });
};
/* 修改 */
export const infrastructureEdit = (query) => {
  return request({ url: '/inspect/base', method: 'put', data: query });
};

/* 删除 */
export const infrastructureDel = (query) => {
  return request({ url: '/inspect/base/'+query, method: 'delete', data: query });
};

/* 基础环境巡检 详情列表 */
export const infrastructureDetailList = (query) => {
  return request({ url: `/inspect/base/${query}`, method: 'get' });
};



/* 巡检作业  模型  ********************************************************************/

export const inspecWorkModelList = (query) => {
  return request({ url: '/inspect/model/page', method: 'get', params: query });
};

/* 新增 */
export const inspecWorkModelAdd = (query) => {
  return request({ url: '/inspect/model', method: 'post', data: query });
};
/* 修改 */
export const inspecWorkModelEdit = (query) => {
  return request({ url: '/inspect/model', method: 'put', data: query });
};

/* 删除 */
export const inspecWorkModelDel = (query) => {
  return request({ url: '/inspect/model/'+query, method: 'delete',data:query});
};


/* 资产列表 */
export const inspecWorkPropertylList = (query) => {
  return request({ url: '/inspect/model/assetList', method: 'get', params: query });
};

/* 巡检作业模型 详情 */
export const inspecWorkPropertylDetailList = (query) => {
  return request({ url: `/inspect/model/${query}`, method: 'get', params: query });
};



/* 导出 */
export const inspecExport = (query) => {
  return request({ url: `/inspect/serverNetwork/export`, method: 'get', params: query });
};